package eviva.application;

import java.util.ArrayList;

public abstract class UnusedListContainer<T> {

	/**
	 * Represents a list of the enclosing kind
	 */
	public class List {
		private ArrayList<T> list;

		public List() {
			list = new ArrayList<T>();
		}

		/**
		 * Add element
		 * 
		 * @param element
		 */
		public void add(T element) {
			list.add(element);
		}

		/**
		 * Access all elements
		 * 
		 * @return list of all elements
		 */
		public ArrayList<T> getAll() {
			return list;
		}

		/**
		 * Access element at index
		 * 
		 * @param index
		 * @return element
		 */
		public T get(int index) {
			return list.get(index);
		}

		/**
		 * Removes element at index
		 * 
		 * @param index
		 * @return removed element
		 */
		public T remove(int index) {
			return list.remove(index);
		}
	}
}
